package com.hzsai.service.Impl;

import com.hzsai.mappersa.OrderMapper;
import com.hzsai.pojo.Order;
import com.hzsai.pojo.User;
import com.hzsai.service.OrderCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * hzsai 2019/8/18
 * usage:
 **/
@Service
public class OrderCustomerServiceImpl implements OrderCustomerService {

    @Autowired
    private OrderMapper mapper;

    @Override
    public Order findOrderById(Integer id) {
        Order order = mapper.findById(id);
        System.out.println("Order: " + order);
        return order;
    }

    @Override
    public User findUserByUserInfo(User user) {
        User u = mapper.findByUserInfo(user);
        return u;
    }

    @Override
    public User updateUserInfo(User user) {
        User u = mapper.updateUserInfo(user);
        return u;
    }
}
